import com.tian.dao.EmpMapper;
import com.tian.entity.Emp;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author: Tian
 * @version: 1.0
 * @since: 1.0
 * @date: 2024/3/8/20:51
 */
public class test {

    @Test
    public void testEmp(){
        Emp emp=new Emp(8893,"tianlei","baojie",2434,new Date(),new BigDecimal(1200),new BigDecimal(100),12);
        System.out.println(emp);
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");
        EmpMapper bean = applicationContext.getBean(EmpMapper.class);
        int insert = bean.updateByPrimaryKey(emp);
        System.out.println(insert);
    }
}
